/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * <pre>
 * from https://github.com/scx567888/live-room-watcher/blob/master/src/main/proto/douyin_hack/webcast/im/RoomRankMessage.proto
 * 直播间排行榜
 * </pre>
 *
 * Protobuf type {@code RoomRankMessage}
 */
public final class RoomRankMessage extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:RoomRankMessage)
    RoomRankMessageOrBuilder {
private static final long serialVersionUID = 0L;
  // Use RoomRankMessage.newBuilder() to construct.
  private RoomRankMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private RoomRankMessage() {
    ranksList_ = java.util.Collections.emptyList();
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new RoomRankMessage();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_RoomRankMessage_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_RoomRankMessage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            RoomRankMessage.class, Builder.class);
  }

  public interface RoomRankOrBuilder extends
      // @@protoc_insertion_point(interface_extends:RoomRankMessage.RoomRank)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.User user = 1;</code>
     * @return Whether the user field is set.
     */
    boolean hasUser();
    /**
     * <code>.User user = 1;</code>
     * @return The user.
     */
    User getUser();
    /**
     * <code>.User user = 1;</code>
     */
    UserOrBuilder getUserOrBuilder();

    /**
     * <code>string scoreStr = 2;</code>
     * @return The scoreStr.
     */
    String getScoreStr();
    /**
     * <code>string scoreStr = 2;</code>
     * @return The bytes for scoreStr.
     */
    com.google.protobuf.ByteString
        getScoreStrBytes();

    /**
     * <code>bool profileHidden = 3;</code>
     * @return The profileHidden.
     */
    boolean getProfileHidden();
  }
  /**
   * Protobuf type {@code RoomRankMessage.RoomRank}
   */
  public static final class RoomRank extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:RoomRankMessage.RoomRank)
      RoomRankOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use RoomRank.newBuilder() to construct.
    private RoomRank(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private RoomRank() {
      scoreStr_ = "";
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new RoomRank();
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_RoomRankMessage_RoomRank_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_RoomRankMessage_RoomRank_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              RoomRank.class, Builder.class);
    }

    private int bitField0_;
    public static final int USER_FIELD_NUMBER = 1;
    private User user_;
    /**
     * <code>.User user = 1;</code>
     * @return Whether the user field is set.
     */
    @Override
    public boolean hasUser() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>.User user = 1;</code>
     * @return The user.
     */
    @Override
    public User getUser() {
      return user_ == null ? User.getDefaultInstance() : user_;
    }
    /**
     * <code>.User user = 1;</code>
     */
    @Override
    public UserOrBuilder getUserOrBuilder() {
      return user_ == null ? User.getDefaultInstance() : user_;
    }

    public static final int SCORESTR_FIELD_NUMBER = 2;
    @SuppressWarnings("serial")
    private volatile Object scoreStr_ = "";
    /**
     * <code>string scoreStr = 2;</code>
     * @return The scoreStr.
     */
    @Override
    public String getScoreStr() {
      Object ref = scoreStr_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        scoreStr_ = s;
        return s;
      }
    }
    /**
     * <code>string scoreStr = 2;</code>
     * @return The bytes for scoreStr.
     */
    @Override
    public com.google.protobuf.ByteString
        getScoreStrBytes() {
      Object ref = scoreStr_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        scoreStr_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int PROFILEHIDDEN_FIELD_NUMBER = 3;
    private boolean profileHidden_ = false;
    /**
     * <code>bool profileHidden = 3;</code>
     * @return The profileHidden.
     */
    @Override
    public boolean getProfileHidden() {
      return profileHidden_;
    }

    private byte memoizedIsInitialized = -1;
    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) != 0)) {
        output.writeMessage(1, getUser());
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scoreStr_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scoreStr_);
      }
      if (profileHidden_ != false) {
        output.writeBool(3, profileHidden_);
      }
      getUnknownFields().writeTo(output);
    }

    @Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getUser());
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scoreStr_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, scoreStr_);
      }
      if (profileHidden_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(3, profileHidden_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof RoomRank)) {
        return super.equals(obj);
      }
      RoomRank other = (RoomRank) obj;

      if (hasUser() != other.hasUser()) return false;
      if (hasUser()) {
        if (!getUser()
            .equals(other.getUser())) return false;
      }
      if (!getScoreStr()
          .equals(other.getScoreStr())) return false;
      if (getProfileHidden()
          != other.getProfileHidden()) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasUser()) {
        hash = (37 * hash) + USER_FIELD_NUMBER;
        hash = (53 * hash) + getUser().hashCode();
      }
      hash = (37 * hash) + SCORESTR_FIELD_NUMBER;
      hash = (53 * hash) + getScoreStr().hashCode();
      hash = (37 * hash) + PROFILEHIDDEN_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getProfileHidden());
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static RoomRank parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static RoomRank parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static RoomRank parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static RoomRank parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static RoomRank parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static RoomRank parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static RoomRank parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static RoomRank parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static RoomRank parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static RoomRank parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static RoomRank parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static RoomRank parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(RoomRank prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code RoomRankMessage.RoomRank}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:RoomRankMessage.RoomRank)
        RoomRankOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return Douyin.internal_static_RoomRankMessage_RoomRank_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return Douyin.internal_static_RoomRankMessage_RoomRank_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                RoomRank.class, Builder.class);
      }

      // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.RoomRankMessage.RoomRank.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getUserFieldBuilder();
        }
      }
      @Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        user_ = null;
        if (userBuilder_ != null) {
          userBuilder_.dispose();
          userBuilder_ = null;
        }
        scoreStr_ = "";
        profileHidden_ = false;
        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return Douyin.internal_static_RoomRankMessage_RoomRank_descriptor;
      }

      @Override
      public RoomRank getDefaultInstanceForType() {
        return RoomRank.getDefaultInstance();
      }

      @Override
      public RoomRank build() {
        RoomRank result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public RoomRank buildPartial() {
        RoomRank result = new RoomRank(this);
        if (bitField0_ != 0) { buildPartial0(result); }
        onBuilt();
        return result;
      }

      private void buildPartial0(RoomRank result) {
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.user_ = userBuilder_ == null
              ? user_
              : userBuilder_.build();
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.scoreStr_ = scoreStr_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.profileHidden_ = profileHidden_;
        }
        result.bitField0_ |= to_bitField0_;
      }

      @Override
      public Builder clone() {
        return super.clone();
      }
      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.setField(field, value);
      }
      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.addRepeatedField(field, value);
      }
      @Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof RoomRank) {
          return mergeFrom((RoomRank)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(RoomRank other) {
        if (other == RoomRank.getDefaultInstance()) return this;
        if (other.hasUser()) {
          mergeUser(other.getUser());
        }
        if (!other.getScoreStr().isEmpty()) {
          scoreStr_ = other.scoreStr_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        if (other.getProfileHidden() != false) {
          setProfileHidden(other.getProfileHidden());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @Override
      public final boolean isInitialized() {
        return true;
      }

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10: {
                input.readMessage(
                    getUserFieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x00000001;
                break;
              } // case 10
              case 18: {
                scoreStr_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
              case 24: {
                profileHidden_ = input.readBool();
                bitField0_ |= 0x00000004;
                break;
              } // case 24
              default: {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }
      private int bitField0_;

      private User user_;
      private com.google.protobuf.SingleFieldBuilderV3<
          User, User.Builder, UserOrBuilder> userBuilder_;
      /**
       * <code>.User user = 1;</code>
       * @return Whether the user field is set.
       */
      public boolean hasUser() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>.User user = 1;</code>
       * @return The user.
       */
      public User getUser() {
        if (userBuilder_ == null) {
          return user_ == null ? User.getDefaultInstance() : user_;
        } else {
          return userBuilder_.getMessage();
        }
      }
      /**
       * <code>.User user = 1;</code>
       */
      public Builder setUser(User value) {
        if (userBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          user_ = value;
        } else {
          userBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       * <code>.User user = 1;</code>
       */
      public Builder setUser(
          User.Builder builderForValue) {
        if (userBuilder_ == null) {
          user_ = builderForValue.build();
        } else {
          userBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       * <code>.User user = 1;</code>
       */
      public Builder mergeUser(User value) {
        if (userBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0) &&
            user_ != null &&
            user_ != User.getDefaultInstance()) {
            getUserBuilder().mergeFrom(value);
          } else {
            user_ = value;
          }
        } else {
          userBuilder_.mergeFrom(value);
        }
        if (user_ != null) {
          bitField0_ |= 0x00000001;
          onChanged();
        }
        return this;
      }
      /**
       * <code>.User user = 1;</code>
       */
      public Builder clearUser() {
        bitField0_ = (bitField0_ & ~0x00000001);
        user_ = null;
        if (userBuilder_ != null) {
          userBuilder_.dispose();
          userBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       * <code>.User user = 1;</code>
       */
      public User.Builder getUserBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getUserFieldBuilder().getBuilder();
      }
      /**
       * <code>.User user = 1;</code>
       */
      public UserOrBuilder getUserOrBuilder() {
        if (userBuilder_ != null) {
          return userBuilder_.getMessageOrBuilder();
        } else {
          return user_ == null ?
              User.getDefaultInstance() : user_;
        }
      }
      /**
       * <code>.User user = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          User, User.Builder, UserOrBuilder>
          getUserFieldBuilder() {
        if (userBuilder_ == null) {
          userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              User, User.Builder, UserOrBuilder>(
                  getUser(),
                  getParentForChildren(),
                  isClean());
          user_ = null;
        }
        return userBuilder_;
      }

      private Object scoreStr_ = "";
      /**
       * <code>string scoreStr = 2;</code>
       * @return The scoreStr.
       */
      public String getScoreStr() {
        Object ref = scoreStr_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          scoreStr_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string scoreStr = 2;</code>
       * @return The bytes for scoreStr.
       */
      public com.google.protobuf.ByteString
          getScoreStrBytes() {
        Object ref = scoreStr_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          scoreStr_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string scoreStr = 2;</code>
       * @param value The scoreStr to set.
       * @return This builder for chaining.
       */
      public Builder setScoreStr(
          String value) {
        if (value == null) { throw new NullPointerException(); }
        scoreStr_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       * <code>string scoreStr = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearScoreStr() {
        scoreStr_ = getDefaultInstance().getScoreStr();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       * <code>string scoreStr = 2;</code>
       * @param value The bytes for scoreStr to set.
       * @return This builder for chaining.
       */
      public Builder setScoreStrBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        scoreStr_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      private boolean profileHidden_ ;
      /**
       * <code>bool profileHidden = 3;</code>
       * @return The profileHidden.
       */
      @Override
      public boolean getProfileHidden() {
        return profileHidden_;
      }
      /**
       * <code>bool profileHidden = 3;</code>
       * @param value The profileHidden to set.
       * @return This builder for chaining.
       */
      public Builder setProfileHidden(boolean value) {

        profileHidden_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       * <code>bool profileHidden = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearProfileHidden() {
        bitField0_ = (bitField0_ & ~0x00000004);
        profileHidden_ = false;
        onChanged();
        return this;
      }
      @Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:RoomRankMessage.RoomRank)
    }

    // @@protoc_insertion_point(class_scope:RoomRankMessage.RoomRank)
    private static final RoomRank DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new RoomRank();
    }

    public static RoomRank getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<RoomRank>
        PARSER = new com.google.protobuf.AbstractParser<RoomRank>() {
      @Override
      public RoomRank parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        Builder builder = newBuilder();
        try {
          builder.mergeFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(builder.buildPartial());
        } catch (com.google.protobuf.UninitializedMessageException e) {
          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(builder.buildPartial());
        }
        return builder.buildPartial();
      }
    };

    public static com.google.protobuf.Parser<RoomRank> parser() {
      return PARSER;
    }

    @Override
    public com.google.protobuf.Parser<RoomRank> getParserForType() {
      return PARSER;
    }

    @Override
    public RoomRank getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int bitField0_;
  public static final int COMMON_FIELD_NUMBER = 1;
  private Common common_;
  /**
   * <code>.Common common = 1;</code>
   * @return Whether the common field is set.
   */
  @Override
  public boolean hasCommon() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <code>.Common common = 1;</code>
   * @return The common.
   */
  @Override
  public Common getCommon() {
    return common_ == null ? Common.getDefaultInstance() : common_;
  }
  /**
   * <code>.Common common = 1;</code>
   */
  @Override
  public CommonOrBuilder getCommonOrBuilder() {
    return common_ == null ? Common.getDefaultInstance() : common_;
  }

  public static final int RANKSLIST_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private java.util.List<RoomRank> ranksList_;
  /**
   * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
   */
  @Override
  public java.util.List<RoomRank> getRanksListList() {
    return ranksList_;
  }
  /**
   * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
   */
  @Override
  public java.util.List<? extends RoomRankOrBuilder>
      getRanksListOrBuilderList() {
    return ranksList_;
  }
  /**
   * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
   */
  @Override
  public int getRanksListCount() {
    return ranksList_.size();
  }
  /**
   * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
   */
  @Override
  public RoomRank getRanksList(int index) {
    return ranksList_.get(index);
  }
  /**
   * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
   */
  @Override
  public RoomRankOrBuilder getRanksListOrBuilder(
      int index) {
    return ranksList_.get(index);
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getCommon());
    }
    for (int i = 0; i < ranksList_.size(); i++) {
      output.writeMessage(2, ranksList_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getCommon());
    }
    for (int i = 0; i < ranksList_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, ranksList_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof RoomRankMessage)) {
      return super.equals(obj);
    }
    RoomRankMessage other = (RoomRankMessage) obj;

    if (hasCommon() != other.hasCommon()) return false;
    if (hasCommon()) {
      if (!getCommon()
          .equals(other.getCommon())) return false;
    }
    if (!getRanksListList()
        .equals(other.getRanksListList())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasCommon()) {
      hash = (37 * hash) + COMMON_FIELD_NUMBER;
      hash = (53 * hash) + getCommon().hashCode();
    }
    if (getRanksListCount() > 0) {
      hash = (37 * hash) + RANKSLIST_FIELD_NUMBER;
      hash = (53 * hash) + getRanksListList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static RoomRankMessage parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static RoomRankMessage parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static RoomRankMessage parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static RoomRankMessage parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static RoomRankMessage parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static RoomRankMessage parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static RoomRankMessage parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static RoomRankMessage parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static RoomRankMessage parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static RoomRankMessage parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static RoomRankMessage parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static RoomRankMessage parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(RoomRankMessage prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * from https://github.com/scx567888/live-room-watcher/blob/master/src/main/proto/douyin_hack/webcast/im/RoomRankMessage.proto
   * 直播间排行榜
   * </pre>
   *
   * Protobuf type {@code RoomRankMessage}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:RoomRankMessage)
      RoomRankMessageOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_RoomRankMessage_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_RoomRankMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              RoomRankMessage.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.RoomRankMessage.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getCommonFieldBuilder();
        getRanksListFieldBuilder();
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      common_ = null;
      if (commonBuilder_ != null) {
        commonBuilder_.dispose();
        commonBuilder_ = null;
      }
      if (ranksListBuilder_ == null) {
        ranksList_ = java.util.Collections.emptyList();
      } else {
        ranksList_ = null;
        ranksListBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_RoomRankMessage_descriptor;
    }

    @Override
    public RoomRankMessage getDefaultInstanceForType() {
      return RoomRankMessage.getDefaultInstance();
    }

    @Override
    public RoomRankMessage build() {
      RoomRankMessage result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public RoomRankMessage buildPartial() {
      RoomRankMessage result = new RoomRankMessage(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(RoomRankMessage result) {
      if (ranksListBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          ranksList_ = java.util.Collections.unmodifiableList(ranksList_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.ranksList_ = ranksList_;
      } else {
        result.ranksList_ = ranksListBuilder_.build();
      }
    }

    private void buildPartial0(RoomRankMessage result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.common_ = commonBuilder_ == null
            ? common_
            : commonBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof RoomRankMessage) {
        return mergeFrom((RoomRankMessage)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(RoomRankMessage other) {
      if (other == RoomRankMessage.getDefaultInstance()) return this;
      if (other.hasCommon()) {
        mergeCommon(other.getCommon());
      }
      if (ranksListBuilder_ == null) {
        if (!other.ranksList_.isEmpty()) {
          if (ranksList_.isEmpty()) {
            ranksList_ = other.ranksList_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureRanksListIsMutable();
            ranksList_.addAll(other.ranksList_);
          }
          onChanged();
        }
      } else {
        if (!other.ranksList_.isEmpty()) {
          if (ranksListBuilder_.isEmpty()) {
            ranksListBuilder_.dispose();
            ranksListBuilder_ = null;
            ranksList_ = other.ranksList_;
            bitField0_ = (bitField0_ & ~0x00000002);
            ranksListBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getRanksListFieldBuilder() : null;
          } else {
            ranksListBuilder_.addAllMessages(other.ranksList_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              input.readMessage(
                  getCommonFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              RoomRank m =
                  input.readMessage(
                      RoomRank.parser(),
                      extensionRegistry);
              if (ranksListBuilder_ == null) {
                ensureRanksListIsMutable();
                ranksList_.add(m);
              } else {
                ranksListBuilder_.addMessage(m);
              }
              break;
            } // case 18
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private Common common_;
    private com.google.protobuf.SingleFieldBuilderV3<
        Common, Common.Builder, CommonOrBuilder> commonBuilder_;
    /**
     * <code>.Common common = 1;</code>
     * @return Whether the common field is set.
     */
    public boolean hasCommon() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>.Common common = 1;</code>
     * @return The common.
     */
    public Common getCommon() {
      if (commonBuilder_ == null) {
        return common_ == null ? Common.getDefaultInstance() : common_;
      } else {
        return commonBuilder_.getMessage();
      }
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder setCommon(Common value) {
      if (commonBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        common_ = value;
      } else {
        commonBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder setCommon(
        Common.Builder builderForValue) {
      if (commonBuilder_ == null) {
        common_ = builderForValue.build();
      } else {
        commonBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder mergeCommon(Common value) {
      if (commonBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0) &&
          common_ != null &&
          common_ != Common.getDefaultInstance()) {
          getCommonBuilder().mergeFrom(value);
        } else {
          common_ = value;
        }
      } else {
        commonBuilder_.mergeFrom(value);
      }
      if (common_ != null) {
        bitField0_ |= 0x00000001;
        onChanged();
      }
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder clearCommon() {
      bitField0_ = (bitField0_ & ~0x00000001);
      common_ = null;
      if (commonBuilder_ != null) {
        commonBuilder_.dispose();
        commonBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Common.Builder getCommonBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getCommonFieldBuilder().getBuilder();
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public CommonOrBuilder getCommonOrBuilder() {
      if (commonBuilder_ != null) {
        return commonBuilder_.getMessageOrBuilder();
      } else {
        return common_ == null ?
            Common.getDefaultInstance() : common_;
      }
    }
    /**
     * <code>.Common common = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        Common, Common.Builder, CommonOrBuilder>
        getCommonFieldBuilder() {
      if (commonBuilder_ == null) {
        commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            Common, Common.Builder, CommonOrBuilder>(
                getCommon(),
                getParentForChildren(),
                isClean());
        common_ = null;
      }
      return commonBuilder_;
    }

    private java.util.List<RoomRank> ranksList_ =
      java.util.Collections.emptyList();
    private void ensureRanksListIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        ranksList_ = new java.util.ArrayList<RoomRank>(ranksList_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        RoomRank, RoomRank.Builder, RoomRankOrBuilder> ranksListBuilder_;

    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public java.util.List<RoomRank> getRanksListList() {
      if (ranksListBuilder_ == null) {
        return java.util.Collections.unmodifiableList(ranksList_);
      } else {
        return ranksListBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public int getRanksListCount() {
      if (ranksListBuilder_ == null) {
        return ranksList_.size();
      } else {
        return ranksListBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public RoomRank getRanksList(int index) {
      if (ranksListBuilder_ == null) {
        return ranksList_.get(index);
      } else {
        return ranksListBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder setRanksList(
        int index, RoomRank value) {
      if (ranksListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRanksListIsMutable();
        ranksList_.set(index, value);
        onChanged();
      } else {
        ranksListBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder setRanksList(
        int index, RoomRank.Builder builderForValue) {
      if (ranksListBuilder_ == null) {
        ensureRanksListIsMutable();
        ranksList_.set(index, builderForValue.build());
        onChanged();
      } else {
        ranksListBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder addRanksList(RoomRank value) {
      if (ranksListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRanksListIsMutable();
        ranksList_.add(value);
        onChanged();
      } else {
        ranksListBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder addRanksList(
        int index, RoomRank value) {
      if (ranksListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRanksListIsMutable();
        ranksList_.add(index, value);
        onChanged();
      } else {
        ranksListBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder addRanksList(
        RoomRank.Builder builderForValue) {
      if (ranksListBuilder_ == null) {
        ensureRanksListIsMutable();
        ranksList_.add(builderForValue.build());
        onChanged();
      } else {
        ranksListBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder addRanksList(
        int index, RoomRank.Builder builderForValue) {
      if (ranksListBuilder_ == null) {
        ensureRanksListIsMutable();
        ranksList_.add(index, builderForValue.build());
        onChanged();
      } else {
        ranksListBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder addAllRanksList(
        Iterable<? extends RoomRank> values) {
      if (ranksListBuilder_ == null) {
        ensureRanksListIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, ranksList_);
        onChanged();
      } else {
        ranksListBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder clearRanksList() {
      if (ranksListBuilder_ == null) {
        ranksList_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        ranksListBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public Builder removeRanksList(int index) {
      if (ranksListBuilder_ == null) {
        ensureRanksListIsMutable();
        ranksList_.remove(index);
        onChanged();
      } else {
        ranksListBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public RoomRank.Builder getRanksListBuilder(
        int index) {
      return getRanksListFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public RoomRankOrBuilder getRanksListOrBuilder(
        int index) {
      if (ranksListBuilder_ == null) {
        return ranksList_.get(index);  } else {
        return ranksListBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public java.util.List<? extends RoomRankOrBuilder>
         getRanksListOrBuilderList() {
      if (ranksListBuilder_ != null) {
        return ranksListBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(ranksList_);
      }
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public RoomRank.Builder addRanksListBuilder() {
      return getRanksListFieldBuilder().addBuilder(
          RoomRank.getDefaultInstance());
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public RoomRank.Builder addRanksListBuilder(
        int index) {
      return getRanksListFieldBuilder().addBuilder(
          index, RoomRank.getDefaultInstance());
    }
    /**
     * <code>repeated .RoomRankMessage.RoomRank ranksList = 2;</code>
     */
    public java.util.List<RoomRank.Builder>
         getRanksListBuilderList() {
      return getRanksListFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        RoomRank, RoomRank.Builder, RoomRankOrBuilder>
        getRanksListFieldBuilder() {
      if (ranksListBuilder_ == null) {
        ranksListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            RoomRank, RoomRank.Builder, RoomRankOrBuilder>(
                ranksList_,
                ((bitField0_ & 0x00000002) != 0),
                getParentForChildren(),
                isClean());
        ranksList_ = null;
      }
      return ranksListBuilder_;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:RoomRankMessage)
  }

  // @@protoc_insertion_point(class_scope:RoomRankMessage)
  private static final RoomRankMessage DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new RoomRankMessage();
  }

  public static RoomRankMessage getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<RoomRankMessage>
      PARSER = new com.google.protobuf.AbstractParser<RoomRankMessage>() {
    @Override
    public RoomRankMessage parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<RoomRankMessage> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<RoomRankMessage> getParserForType() {
    return PARSER;
  }

  @Override
  public RoomRankMessage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

